<style type="text/css">
.sI { margin: 10px; }
.searchInfo li{ float: left; margin: 0 10px; }
</style>
            <!-- Start main content -->
            <div class="main-content">
				<div style="width: 100%; float: left;">
					<!-- Header -->
					<div class="content_header">
						<h2 class="centerBoxHeading">Tìm kiếm</h2>
					</div>
					<div class="content_detail">
					<div class="sI">
						<p><strong>Thông tin tìm kiếm :</strong></p>
						<div>
							<ul class="searchInfo">
								<li>Tên hoặc mã sản phẩm: <?php echo $this->name?></li>
								<?php 
									if(trim($this->searchType) != "0")
									{
								?>
								<li>Màu sắc: <?php echo $this->color?></li>
								<li>Kích cỡ: <?php echo $this->size?></li>
								<li>Giá: <?php echo $this->priceFrom?> - <?php echo $this->priceTo?></li>		
								<?php
									}
								?>
							</ul>
						</div>
					</div>
					<div style="clear: both;"></div>
					<?php foreach ($this->productList as $p)
					{
					?>
						<div class="product-wrapper">
							<div class="product-image">
								<a href="<?php echo $this->url->action("detail","Products","",$p['id'])?>"><img src="<?php echo $p['image']?>"/></a>
							</div>
							<div class="product-information">
								Mã sản phẩm: <?php echo $p['id'];?><br/>
								
								Màu sắc: <?php echo $p['color'];?><br>
								Kích cỡ: <?php echo $p['size'];?>
							</div>
							<div class="product-bottom">
								<div class="facebook-button">
									<fb:like href="<?php echo $this->url->action("detail", "Products",array($p['id']))?>" layout="button_count" show_faces="false" width="100"></fb:like>
								</div>
								<a onclick="addCart(this)" data="<?php echo $p['id'];?>" ajaxify="<?php echo $this->url->action("addCart", "ShoppingCart")?>" title="<?php echo $p['name'];?>" dialog="<?php echo $this->url->action("addCartDialog", array($p['id']))?>">
									<div class="detail-button">Đặt hàng</div>
								</a>
								<div class="price">
									<?php echo number_format($p['price'],0,',','.').' '.$p['unit'];?>
								</div>
							</div>
						</div>
					<?php 
					}
					?>
					<?php 
					if(sizeof($this->productList) == 0)
					{
					?>
					<h2 style="margin: 20px;">Không tìm thấy kết quả...</h2>
					<?php }?>
					</div>
				</div>
            </div>
 <!-- End main content -->
 <script type="text/javascript">
 	function addCart(obj)
 	{
 	 	$.get($(obj).attr("dialog"), function(data){
 	 		Boxy.ask(data, ['Đặt mua', 'Hủy bỏ'], function(val) {
 	 	 		if(val == 'Đặt mua')
 	 	 		{
 	 	 			jsondata = {
 	 	 	 	 			id : $(obj).attr("data"), 
 	 	 	 	 			color: $("#color").val(),
 	 	 	 	 			size: $("#size").val()
 	 	 	 	 	};
 	 	 			$.post($(obj).attr("ajaxify"), jsondata, function(res){
 	 					if(res.success)
 	 					{
 	 						Boxy.alert("<b>Đặt hàng thành công !</b>");
 	 						$("#_cartItemCount").html(res.cart_total);
 	 					}
 	 				}
 	 				, "json")
 	 	 	 	}   
  	  	     }, {title: 'Đặt mua ' + $(obj).attr("title")});
 	 	});
 	}
 </script>